﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mes.Application.DTO.Results.Quality
{
    public class CharacteristicResult
    {
        /// <summary>
        /// 特征Id
        /// </summary>
        public int Char_Id { get; set; }

        /// <summary>
        /// 特征名称
        /// </summary>
        public string Char_Name { get; set; }

        /// <summary>
        /// 特征描述
        /// </summary>
        public string? Char_Desc { get; set; }

        /// <summary>
        /// 特征类型
        /// </summary>
        public int Type { get; set; } = 0;

        /// <summary>
        /// 单位
        /// </summary>
        public int Uom_Id { get; set; }

        /// <summary>
        /// 单位名称
        /// </summary>
        public string Uom_Name { get; set; }=string.Empty;

        /// <summary>
        /// 默认图
        /// </summary>
        public int Default_Chart { get; set; } = 5;
    }

    public class CharacteristicDetailResult:CharacteristicResult
    {
        /// <summary>
        /// 小数位数
        /// </summary>
        public int Num_Decimals { get; set; } = 0;

        /// <summary>
        /// 标准样本大小
        /// </summary>
        public int Normal_Sample_Size { get; set; } = 1;

        /// <summary>
        /// 最小样本大小
        /// </summary>
        public int Minimum_Sample_Size { get; set; } = 1;

        /// <summary>
        /// 最大样本大小
        /// </summary>
        public int? Maximum_Sample_Size { get; set; }

        /// <summary>
        /// 自动收集
        /// </summary>
        public bool Automated_Coll { get; set; } = false;

        /// <summary>
        /// 时间间隔
        /// </summary>
        public int? Time_Interval { get; set; }

        /// <summary>
        /// 时间间隔单位
        /// 0 = seconds, 1 = minutes, 2 = hours
        /// </summary>
        public int? Time_Int_Unit { get; set; }
    }

    public class CharacteristicResultForQmSpec
    {
        /// <summary>
        /// 特征Id
        /// </summary>
        public int Char_Id { get; set; }

        /// <summary>
        /// 特征名称
        /// </summary>
        public string Char_Name { get; set; }

        /// <summary>
        /// 特征描述
        /// </summary>
        public string? Char_Desc { get; set; }

        /// <summary>
        /// 特征类型
        /// </summary>
        public int Type { get; set; } = 0;

        /// <summary>
        /// 特征类型描述
        /// </summary>
        public string? Type_Desc { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public int Uom_Id { get; set; }

        /// <summary>
        /// 单位名称
        /// </summary>
        public string? Uom_Desc { get; set; }

        /// <summary>
        /// 默认图
        /// </summary>
        public int Default_Chart { get; set; } = 5;

        /// <summary>
        /// 默认图描述
        /// </summary>
        public string? Default_Chart_Desc { get; set; }

        /// <summary>
        /// 自动收集
        /// </summary>
        public bool Automated_Coll { get; set; } = false;

        /// <summary>
        /// 自动收集描述
        /// </summary>
        public string? Automated_Coll_Desc { get; set; }

        /// <summary>
        /// 时间间隔
        /// </summary>
        public int? Time_Interval { get; set; }

        /// <summary>
        /// 时间间隔单位
        /// 0 = seconds, 1 = minutes, 2 = hours
        /// </summary>
        public int? Time_Int_Unit { get; set; }

        /// <summary>
        /// 时间间隔单位
        /// 0 = seconds, 1 = minutes, 2 = hours
        /// </summary>
        public string? Time_Int_Unit_Desc { get; set; }

        /// <summary>
        /// 小数位数
        /// </summary>
        public int Num_Decimals { get; set; } = 0;

        /// <summary>
        /// 样本大小来源 
        /// </summary>
        public int? Sample_Size_Source { get; set; } = 0;

        /// <summary>
        /// 样本大小来源描述
        /// </summary>
        public string? Sample_Size_Source_Desc { get; set; }

        /// <summary>
        /// 标准样本大小
        /// </summary>
        public int Normal_Sample_Size { get; set; } = 1;

        /// <summary>
        /// 最小样本大小
        /// </summary>
        public int Minimum_Sample_Size { get; set; } = 1;

        /// <summary>
        /// 最大样本大小
        /// </summary>
        public int? Maximum_Sample_Size { get; set; }
    }
}
